package com.fastloan.mgt.jx.model.dto;

import com.kawins.spring.valid.annotation.IDCard;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Objects;
import java.util.StringJoiner;

/**
 * 贷款请求信息
 * @author chenkai
 * createTime 2018-01-2018/1/7 13:05
 */
public class JxLoanDTO {
    /**
     * 流水号（唯一），用来标识本笔请求
     */
    @NotNull
    private String agent_order_id;

    /**
     * 用户名
     */
   
    private String name;

    /**
     * 登录名
     */
    private String user_id;

    /**
     * 手机号
     */
   
    private String phone;

    /**
     * 身份证号码
     */
    private String card_id;

    /**
     * 银行卡号码
     */
   
    private String bank_id;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 国家id
     */
   
    private String country_id;

    /**
     * 用户类型
     */
   
    private String customer_type;

    /**
     * 账户资金
     */
   
    private BigDecimal account_capital;

    /**
     * 是否是国外店铺
     */
   
    private Boolean overseas;
    /**
     * 店铺总销量
     */
   
    private String store_sales;

    /**
     * 店铺资质
     */
   
    private String store_qualifications;

    /**
     * 店铺资金
     */
   
    private BigDecimal store_capital;

    /**
     * 订单历史流水
     */
   
    private String order_history;

    /**
     * 注册年限
     */
   
    private Integer years;

    /**
     * 客户评级信息
     */
   
    private String evaluation;

    /**
     * 地址
     */
   
    private String address;

    /**
     * 店铺简介（店铺名称、经营范围、经营年限）
     */
   
    private String store_info;

    /**
     *历史订单信息（购买品类、数额等）
     */
   
    private String order_history_in;

    /**
     * 订单总金额
     */
   
    private BigDecimal order_money;

    /**
     * 店铺id(这是买家)
     */
   
    private String store_id;

    /**
     * 订单定金
     */
   
    private BigDecimal order_subscription;

    /**
     * 订单状态（确定的状态，不能更改）
     */
   
    private String order_status;

    /**
     * 订单时间
     */
   
    private String order_time;

    /**
     * 订单类型
     */
   
    private String order_type;

    /**
     *订单商品信息
     */
   
    private String order_good_info;

    /**
     *订单的是否已经提货
     */
   
    private Boolean pick_up_goods;

    /**
     * 授权机构id
     */
   
    private String agent_id;

    /**
     * 收款方户名
     */
    private String payee_bank_account;

    /**
     * 收款方银行名称
     */
    private String payee_bank_name;

    /**
     * 收款方银行卡号
     */
    private String payee_bank_card;

    /**
     * 跳回接入方的URL
     */
    @NotNull
    private String comeback_url;

    @NotNull
    private String loan_url;

    public String getLoan_url() {
        return loan_url;
    }

    public void setLoan_url(String loan_url) {
        this.loan_url = loan_url;
    }

    public String getComeback_url() {
        return comeback_url;
    }

    public void setComeback_url(String comeback_url) {
        this.comeback_url = comeback_url;
    }

    public String getPayee_bank_account() {
        return payee_bank_account;
    }

    public void setPayee_bank_account(String payee_bank_account) {
        this.payee_bank_account = payee_bank_account;
    }

    public String getPayee_bank_name() {
        return payee_bank_name;
    }

    public void setPayee_bank_name(String payee_bank_name) {
        this.payee_bank_name = payee_bank_name;
    }

    public String getPayee_bank_card() {
        return payee_bank_card;
    }

    public void setPayee_bank_card(String payee_bank_card) {
        this.payee_bank_card = payee_bank_card;
    }

    public String getAgent_id() {
        return agent_id;
    }

    public void setAgent_id(String agent_id) {
        this.agent_id = agent_id;
    }

    public String getAgent_order_id() {
        return agent_order_id;
    }

    public void setAgent_order_id(String agent_order_id) {
        this.agent_order_id = agent_order_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCard_id() {
        return card_id;
    }

    public void setCard_id(String card_id) {
        this.card_id = card_id;
    }

    public String getBank_id() {
        return bank_id;
    }

    public void setBank_id(String bank_id) {
        this.bank_id = bank_id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getCountry_id() {
        return country_id;
    }

    public void setCountry_id(String country_id) {
        this.country_id = country_id;
    }

    public String getCustomer_type() {
        return customer_type;
    }

    public void setCustomer_type(String customer_type) {
        this.customer_type = customer_type;
    }

    public BigDecimal getAccount_capital() {
        return account_capital;
    }

    public void setAccount_capital(BigDecimal account_capital) {
        this.account_capital = account_capital;
    }

    public Boolean getOverseas() {
        return overseas;
    }

    public void setOverseas(Boolean overseas) {
        this.overseas = overseas;
    }

    public String getStore_sales() {
        return store_sales;
    }

    public void setStore_sales(String store_sales) {
        this.store_sales = store_sales;
    }

    public String getStore_qualifications() {
        return store_qualifications;
    }

    public void setStore_qualifications(String store_qualifications) {
        this.store_qualifications = store_qualifications;
    }

    public BigDecimal getStore_capital() {
        return store_capital;
    }

    public void setStore_capital(BigDecimal store_capital) {
        this.store_capital = store_capital;
    }

    public String getOrder_history() {
        return order_history;
    }

    public void setOrder_history(String order_history) {
        this.order_history = order_history;
    }

    public Integer getYears() {
        return years;
    }

    public void setYears(Integer years) {
        this.years = years;
    }

    public String getEvaluation() {
        return evaluation;
    }

    public void setEvaluation(String evaluation) {
        this.evaluation = evaluation;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getStore_info() {
        return store_info;
    }

    public void setStore_info(String store_info) {
        this.store_info = store_info;
    }

    public String getOrder_history_in() {
        return order_history_in;
    }

    public void setOrder_history_in(String order_history_in) {
        this.order_history_in = order_history_in;
    }

    public BigDecimal getOrder_money() {
        return order_money;
    }

    public void setOrder_money(BigDecimal order_money) {
        this.order_money = order_money;
    }

    public String getStore_id() {
        return store_id;
    }

    public void setStore_id(String store_id) {
        this.store_id = store_id;
    }

    public BigDecimal getOrder_subscription() {
        return order_subscription;
    }

    public void setOrder_subscription(BigDecimal order_subscription) {
        this.order_subscription = order_subscription;
    }

    public String getOrder_status() {
        return order_status;
    }

    public void setOrder_status(String order_status) {
        this.order_status = order_status;
    }

    public String getOrder_time() {
        return order_time;
    }

    public void setOrder_time(String order_time) {
        this.order_time = order_time;
    }

    public String getOrder_type() {
        return order_type;
    }

    public void setOrder_type(String order_type) {
        this.order_type = order_type;
    }

    public String getOrder_good_info() {
        return order_good_info;
    }

    public void setOrder_good_info(String order_good_info) {
        this.order_good_info = order_good_info;
    }

    public Boolean getPick_up_goods() {
        return pick_up_goods;
    }

    public void setPick_up_goods(Boolean pick_up_goods) {
        this.pick_up_goods = pick_up_goods;
    }


    @Override
    public String toString() {
        return new StringJoiner(", ", this.getClass().getSimpleName() + "[", "]")
                .add("account_capital = " + account_capital)
                .add("address = " + address)
                .add("agent_id = " + agent_id)
                .add("agent_order_id = " + agent_order_id)
                .add("bank_id = " + bank_id)
                .add("card_id = " + card_id)
                .add("comeback_url = " + comeback_url)
                .add("country_id = " + country_id)
                .add("customer_type = " + customer_type)
                .add("email = " + email)
                .add("evaluation = " + evaluation)
                .add("name = " + name)
                .add("order_good_info = " + order_good_info)
                .add("order_history = " + order_history)
                .add("order_history_in = " + order_history_in)
                .add("order_money = " + order_money)
                .add("order_status = " + order_status)
                .add("order_subscription = " + order_subscription)
                .add("order_time = " + order_time)
                .add("order_type = " + order_type)
                .add("overseas = " + overseas)
                .add("payee_bank_account = " + payee_bank_account)
                .add("payee_bank_card = " + payee_bank_card)
                .add("payee_bank_name = " + payee_bank_name)
                .add("phone = " + phone)
                .add("pick_up_goods = " + pick_up_goods)
                .add("store_capital = " + store_capital)
                .add("store_id = " + store_id)
                .add("store_info = " + store_info)
                .add("store_qualifications = " + store_qualifications)
                .add("store_sales = " + store_sales)
                .add("user_id = " + user_id)
                .add("years = " + years)
                .toString();
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        JxLoanDTO that = (JxLoanDTO) o;

        return Objects.equals(this.account_capital, that.account_capital) &&
                Objects.equals(this.address, that.address) &&
                Objects.equals(this.agent_id, that.agent_id) &&
                Objects.equals(this.agent_order_id, that.agent_order_id) &&
                Objects.equals(this.bank_id, that.bank_id) &&
                Objects.equals(this.card_id, that.card_id) &&
                Objects.equals(this.comeback_url, that.comeback_url) &&
                Objects.equals(this.country_id, that.country_id) &&
                Objects.equals(this.customer_type, that.customer_type) &&
                Objects.equals(this.email, that.email) &&
                Objects.equals(this.evaluation, that.evaluation) &&
                Objects.equals(this.name, that.name) &&
                Objects.equals(this.order_good_info, that.order_good_info) &&
                Objects.equals(this.order_history, that.order_history) &&
                Objects.equals(this.order_history_in, that.order_history_in) &&
                Objects.equals(this.order_money, that.order_money) &&
                Objects.equals(this.order_status, that.order_status) &&
                Objects.equals(this.order_subscription, that.order_subscription) &&
                Objects.equals(this.order_time, that.order_time) &&
                Objects.equals(this.order_type, that.order_type) &&
                Objects.equals(this.overseas, that.overseas) &&
                Objects.equals(this.payee_bank_account, that.payee_bank_account) &&
                Objects.equals(this.payee_bank_card, that.payee_bank_card) &&
                Objects.equals(this.payee_bank_name, that.payee_bank_name) &&
                Objects.equals(this.phone, that.phone) &&
                Objects.equals(this.pick_up_goods, that.pick_up_goods) &&
                Objects.equals(this.store_capital, that.store_capital) &&
                Objects.equals(this.store_id, that.store_id) &&
                Objects.equals(this.store_info, that.store_info) &&
                Objects.equals(this.store_qualifications, that.store_qualifications) &&
                Objects.equals(this.store_sales, that.store_sales) &&
                Objects.equals(this.user_id, that.user_id) &&
                Objects.equals(this.years, that.years);
    }

    @Override
    public int hashCode() {
        return Objects.hash(account_capital, address, agent_id, agent_order_id, bank_id, card_id,
                comeback_url, country_id, customer_type, email, evaluation,
                name, order_good_info, order_history, order_history_in, order_money,
                order_status, order_subscription, order_time, order_type, overseas,
                payee_bank_account, payee_bank_card, payee_bank_name, phone, pick_up_goods,
                store_capital, store_id, store_info, store_qualifications, store_sales,
                user_id, years);
    }
}
